
  
  <?php
      $s3 = $this->uri->segment(3,0);
      if($s3){
          echo '<div class="moduleTips">自定义配置已保存，请'.anchor('home/update','更新好评数据',array('title'=>'更新好评数据')).'。</div>';
      }
  ?>
  <script type="text/javascript">
  	jQuery(function(){
			jQuery('.previewc').colorbox();
		});
  </script>
  
  <div class="setConfig">
      <form method="post" action="<?php echo site_url("home/config"); ?>">
      <table width="100%">
          <tr>
              <th>选择样式</th>
              <td>
                  <?php 
                      //print_r($configarray);
                      $style_array = $this->config->item('style_id');
                      //print_r($style_array);
                  ?>
                  <ul class="styleBox clearFix">
                      <?php 
                      foreach($style_array as $k=>$v) {
                           if($configarray['style_id'] == $v){ $input = '<input type="radio" id="st'.$v.'" name="effect" value="'.$v.'" checked="checked" />'; $cur = 'cur'; $st = '已选用';}
                           else{$input = '<input type="radio" id="st'.$v.'" name="effect" value="'.$v.'" />'; $cur = 'non'; $st = '选用';}
						   
						  echo '<li class="'.$cur.'">';
                          echo '<img src="'.base_url('output_style/preview').'/'.$v.'_thumb.jpg" alt="缩略图" />';
                          echo '<div class="hl"><a href="'.base_url('output_style/preview').'/'.$v.'.jpg" title="预览效果" class="previewc">预览效果</a>';
                          echo $input;
                          echo '<label for="st'.$v.'"> '.$st.'</label></div>';
                          echo '</li>';
                      }
                      ?>
                  </ul>
              </td>
          </tr>
          <tr>
              <th>大于多少字的评论才显示</th>
              <td>
                  <?php 
                      $min_txt_num = $style_array = $this->config->item('min_txt_num');
                      echo form_dropdown('min_txt_num',$min_txt_num,$configarray['min_txt_num']);
                  ?>
              </td>
          </tr>
          <tr>
              <th>是否显示买家昵称</th>
              <td>
                  <?php 
                      $visual = $this->config->item('visual');
                      echo form_dropdown('visual',$visual,$configarray['visual']);
                  ?>
              </td>
          </tr>
          <tr>
              <th>滚动速度</th>
              <td>
                  <?php 
                      $intervall = $this->config->item('intervall');
                      echo form_dropdown('intervall',$intervall,$configarray['intervall']);
                  ?>
              </td>
          </tr>
          <tr>
              <th>相同宝贝的评论是否合并</th>
              <td>
                  <?php 
                      $hebing = $this->config->item('hebing');
                      echo form_dropdown('hebing',$hebing,$configarray['hebing']);
                  ?>
              </td>
          </tr>
          <tr>
              <th>宝贝下面显示几条评论</th>
              <td>
                  <?php 
                      $hebingnum = $this->config->item('hebingnum');
                      echo form_dropdown('hebingnum',$hebingnum,$configarray['hebingnum']);
                  ?>
              </td>
          </tr>
          <tr>
              <th></th>
              <td>
                  <input type="submit" name="saveSetting" value="保存设置" />
              </td>
          </tr>
      </table>
      </form>
  </div>
